import request from '@/utils/request'

/**
 * 点赞
 * @param  pictureId - 点赞请求数据
 * @returns {Promise} - 返回一个Promise对象
 */
export function likeAPI(pictureId) {
  return request({
    url: '/like/add',
    method: 'post',
    data: { pictureId }
  })
}

/**
 * 取消点赞
 * @param pictureId - 取消点赞请求数据
 * @returns {Promise} - 返回一个Promise对象
*/
export function unlikeAPI(pictureId) {
  return request({
    url: '/like/cancel',
    method: 'post',
    data: { pictureId }
  })
}
